package com.yike.user.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 店铺表
 *
 * @author Sakura
 * @since 2024-08-26
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "代理商分佣据统计信息")
public class AgentDateStatisticsVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("父代理商ID")
    private Long parenAgentId;

    @ApiModelProperty("订单量")
    private Integer orderNumber;

    @ApiModelProperty("销售额")
    private BigDecimal totalAmount;

    @ApiModelProperty("实收")
    private BigDecimal actualAmount;

    @ApiModelProperty("分佣")
    private BigDecimal totalCommission;

    @ApiModelProperty("新增代理数")
    private Integer addAgentNumber;

    public void setOrderNumber(Integer orderNumber) {
        if (orderNumber == null) {
            this.orderNumber = 0;
        } else {
            this.orderNumber = orderNumber;
        }
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        if (totalAmount == null) {
            this.totalAmount = BigDecimal.ZERO;
        } else {
            this.totalAmount = totalAmount;
        }
    }

    public void setActualAmount(BigDecimal actualAmount) {
        if (actualAmount == null) {
            this.actualAmount = BigDecimal.ZERO;
        } else {
            this.actualAmount = actualAmount;
        }
    }

    public void setTotalCommission(BigDecimal totalCommission) {
        if (totalCommission == null) {
            this.totalCommission = BigDecimal.ZERO;
        } else {
            this.totalCommission = totalCommission;
        }
    }

}
